package com.foreknow.web;

import com.foreknow.entity.ConstantType;
import com.foreknow.service.ContantTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/constype")
public class ConstantTypeController {
    @Autowired
    private ContantTypeService contantTypeService;
    @RequestMapping(value = "/findAllConsType",method = RequestMethod.GET)
    public List<ConstantType> findAllConsType(){
        return contantTypeService.findallConstant();
    }
}
